package com.dk.OrderConsumeController;

import com.alibaba.dubbo.config.annotation.Reference;
import com.dk.pojo.Car;
import com.dk.service.CarServiceI;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
@RequestMapping("orderController")
public class OrderController {

    @Reference //引用dubbo服务接口，不能使用  @Autowired
    private CarServiceI carServiceI;


    @RequestMapping("getCar")
    @ResponseBody
    public Car getCar(){
        return carServiceI.FindAll();
    }
}
